package com.ruoyi.system.api;

import com.ruoyi.common.core.constant.ServiceNameConstants;
import com.ruoyi.system.api.factory.RemoteDriverFallbackFactory;
import com.ruoyi.system.api.factory.RemotePassengerFallbackFactory;
import com.ruoyi.system.api.model.LoginDriver;
import com.ruoyi.system.api.model.LoginPassenger;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;

/**
 * 用户服务
 * 
 * @author ruoyi
 */
@FeignClient(contextId = "RemotePassengerService", value = ServiceNameConstants.VEHICLE_PASSENGER, fallbackFactory = RemotePassengerFallbackFactory.class)
public interface RemotePassengerService
{
    /**
     * 通过手机号查询乘客信息
     *
     * @param mobile 手机号
     * @param source 请求来源 @RequestHeader(SecurityConstants.FROM_SOURCE) String source
     * @return 结果
     */
    @GetMapping("/passenger/getDataByMobile/{mobile}")
    public LoginPassenger getDataByMobile(@PathVariable("mobile") String mobile);

    @PostMapping("/passenger/register")
    public LoginPassenger register(@RequestBody LoginPassenger loginPassenger);
}
